﻿using Microsoft.EntityFrameworkCore;
using WEBAPI.Damoin;

namespace WEBAPI.Indaseture
{
    public class MyDbContext : DbContext
    {
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }
        public DbSet<AccountModel> account {  get; set; }
        public DbSet<RoleModel> role { get; set; }
        public DbSet<DeptModel> dept { get; set; }
        public DbSet<UserRoleModel> userRole { get; set; }
        public DbSet<MenuModel> menu { get; set; }
        public DbSet<MenuRoleModel> menuRole { get; set; }
        public DbSet<ApproveModel> approve {  get; set; }
        public DbSet<FromModel> from { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Entity<FromModel>().HasNoKey();
        }
    }
}
